import Vue from 'vue'
import VueRouter from 'vue-router'
import Myarticle from '@/views/MyArticle'
import Myuser from '@/views/MyUser'
import LaYout from '@/views/LaYout'
const Myfind = () => import('@/views/MyFind')
const Myzixun = () => import('@/views/MyZixun')
const AllCity = () => import('@/views/AllCity')
const Myditu = () => import('@/views/MyDitu')
const Mylogin = () => import('@/views/MyLogin')
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: LaYout,
    redirect: '/article',
    children: [
      { path: 'article', component: Myarticle },
      { path: 'user', component: Myuser },
      {
        path: 'find',
        component: Myfind
      },
      { path: 'zixun', component: Myzixun }
    ]
  },
  { path: '/city', component: AllCity },
  { path: '/ditu', component: Myditu },
  { path: '/login', component: Mylogin }
]

const router = new VueRouter({
  routes
})

export default router
